<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="survey"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div><br />
  <h1><?php echo $heading_title; ?></h1>
  <?php echo $description; ?>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <form action="<?php echo $action; ?>" method="post" id="form">  
  <?php switch($qtype) { case 'radio': if(count($options) > 1) { ?>
  <ul class="options">
  <?php foreach($options as $each_row) {?>
  <li <?php echo ($each_row['default']) ? ' class="selected"':''; ?>><label><input type="radio" name="answer_<?php echo $question_id?>" value="<?php echo $each_row['value']; ?>" <?php echo ($each_row['default']) ? ' checked':''; ?> /><?php echo $each_row['lable']; ?></label> </li>
  <?php } ?>
  <?php if ($error_question) { ?><br />
  <span class="error"><?php echo $error_question; ?></span>
  <?php } ?>  
  </ul>
  <?php } break; case 'checbox': if(count($options) > 1) { ?>
  <div class="options">
  <?php foreach($question_info['options'] as $each_row) {?>
  <label><input type="checkbox" name="answer_<?php echo $question_id?>[]" value="<?php echo $each_row['value']; ?>" <?php echo ($each_row['default']) ? ' checked':''; ?> /><?php echo $each_row['lable']; ?></label>
  <?php } ?>
  <?php if (isset($error_question[$question_id])) { ?><br />
  <span class="error"><?php echo $error_question[$question_id]; ?></span>
  <?php } ?>  
  </div>
  <?php } break; case 'text': ?>
  <div class="options">
  <?php echo $options['lable']; ?><br />
  <input type="text" name="answer_<?php echo $question_id?>" value="<?php echo $options['value']; ?>" />  
  <?php if ($error_question) { ?><br />
  <span class="error"><?php echo $error_question; ?></span>
  <?php } ?>  
  </div>
  <?php break; case 'textarea': ?>
  <div class="options">
  <?php echo $options['lable']; ?><br />  
  <textarea type="text" name="answer_<?php echo $question_id?>" cols="50" rows="5"><?php echo $options['value']; ?></textarea>  
  <?php if ($error_question) { ?><br />
  <span class="error"><?php echo $error_question; ?></span>
  <?php } ?>  
  </div>
  <?php break; } ?>
  <br /><br /> 
  </form>
  <div class="buttons">
    <div class="left"><a href="<?php echo $next; ?>" class="button"><span><?php echo $button_next; ?></span></a></div>
    <div class="right"><a href="<?php echo $prev; ?>" class="button"><span><?php echo $button_prev; ?></span></a></div>
  </div>
  <?php echo $content_bottom; ?></div>
  <script language="javascript">
  	$('.options li').bind('click', function () {
		$(this).parent().find('li').removeClass('selected');
		$(this).addClass('selected');
	});
  </script>
<?php echo $footer; ?>